home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 351-375 / disk_354 / mxmlib / mxmbase.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  5KB  |  212 lines

  1. /* $Revision Header *** Header built automatically - do not edit! ***********
  2.  *
  3.  *    (C) Copyright 1990 by MXM
  4.  *
  5.  *    Name .....: mxmbase.h
  6.  *    Created ..: Saturday 06-Jan-90 23:27
  7.  *    Revision .: 7
  8.  *
  9.  *    Date            Author          Comment
  10.  *    =========       ========        ====================
  11.  *    01-Apr-90    Olsen        Rework for Aztec 5.0
  12.  *    25-Feb-90    Olsen        Changes in structures/functions
  13.  *    08-Feb-90    Olsen        Changes in structures/functions
  14.  *    14-Jan-90    Olsen        Renamed to mxm.library
  15.  *    08-Jan-90       Olsen           Added new functions
  16.  *    08-Jan-90       Olsen           Added PrinterSupport & Joystick
  17.  *    06-Jan-90       Olsen           Created this file!
  18.  *
  19.  * $Revision Header ********************************************************/
  20.  
  21. #ifndef _MXMBASE_H
  22. #define _MXMBASE_H 1
  23.  
  24. #ifndef INTUITION_INTUITIONBASE_H
  25. #include <intuition/intuitionbase.h>
  26. #endif    /* !INTUITION_INTUITIONBASE_H */
  27.  
  28. #ifndef LIBRARIES_DOSEXTENS_H
  29. #include <libraries/dosextens.h>
  30. #endif    /* !LIBRARIES_DOSEXTENS_H */
  31.  
  32. #ifndef GRAPHICS_GFXBASE_H
  33. #include <graphics/gfxbase.h>
  34. #endif    /* !GRAPHICS_GFXBASE_H */
  35.  
  36. #ifndef DEVICES_CONSOLE_H
  37. #include <devices/console.h>
  38. #endif    /* !DEVICES_CONSOLE_H */
  39.  
  40. #ifndef DEVICES_PRINTER_H
  41. #include <devices/printer.h>
  42. #endif    /* !DEVICES_PRINTER_H */
  43.  
  44. #ifndef DEVICES_PRTBASE_H
  45. #include <devices/prtbase.h>
  46. #endif    /* !DEVICES_PRTBASE_H */
  47.  
  48. #ifndef DEVICES_KEYMAP_H
  49. #include <devices/keymap.h>
  50. #endif    /* !DEVICES_KEYMAP_H */
  51.  
  52. #ifndef DEVICES_TIMER_H
  53. #include <devices/timer.h>
  54. #endif    /* !DEVICES_TIMER_H */
  55.  
  56. #ifndef DEVICE_INPUT_H
  57. #include <devices/input.h>
  58. #endif    /* !DEVICE_INPUT_H */
  59.  
  60. #ifndef EXEC_MEMORY_H
  61. #include <exec/memory.h>
  62. #endif    /* !EXEC_MEMORY_H */
  63.  
  64.     /* This will get along with some misnamed structure tags. */
  65.  
  66. #define TimeVal        timeval
  67. #define TimeRequest    timerequest
  68.  
  69.     /* The base structure of mxm.library. */
  70.  
  71. struct MXMBase
  72. {
  73.     struct Library    LibNode;
  74.  
  75.         /* These pointers may be used by any program
  76.          * opening the library.
  77.          */
  78.  
  79.     APTR        IntuitionBase;
  80.     APTR        GfxBase;
  81.     APTR        LayersBase;
  82.     APTR        DOSBase;
  83.     APTR        ConsoleDevice;
  84. };
  85.  
  86.     /* Support structure for PopRequest. */
  87.  
  88. struct PopSupport
  89. {
  90.     ULONG    ps_Flags;
  91.     LONG    ps_TimeOut;
  92. };
  93.  
  94.     /* Private structure to support the Raw->ANSI translation. */
  95.  
  96. struct KeyEquivalent
  97. {
  98.     UBYTE    ke_Normal;
  99.     UBYTE    ke_Shift;
  100.     UBYTE    ke_Control;
  101.     UBYTE    ke_Alternate;
  102. };
  103.  
  104.     /* Support structure for RastPort-dump. */
  105.  
  106. struct PrinterSupport
  107. {
  108.     struct IODRPReq            *ps_PrinterIO;
  109.     struct MsgPort            *ps_PrinterPort;
  110.  
  111.     struct PrinterData        *ps_PrinterData;
  112.     struct PrinterExtendedData    *ps_PrinterExtended;
  113.     struct Preferences        *ps_Preferences;
  114. };
  115.  
  116.     /* Private support structures for Disable/EnableWindow(). */
  117.  
  118. struct DisInfo
  119. {
  120.     struct Gadget    *di_Gadget;
  121.     USHORT         di_Flags;
  122. };
  123.  
  124. struct DisableSupport
  125. {
  126.     ULONG         ds_WindowFlags;
  127.  
  128.     struct DisInfo    *ds_Gadgets;
  129.     LONG         ds_NumGadgets;
  130. };
  131.  
  132.     /* Definitions for the single keycodes returned by KeyConvert
  133.      * and which are not in the standard ASCII char list.
  134.      */
  135.  
  136. #define KC_SHIFT    16    /* Key pressed together with shift. */
  137.  
  138. #define KC_CURSORUP    140    /* Looks like a cursor key. */
  139. #define KC_CURSORDOWN    141
  140. #define KC_CURSORRIGHT    142
  141. #define KC_CURSORLEFT    143
  142.  
  143. #define KC_FKEY1    129    /* The function keys. */
  144. #define KC_FKEY2    130
  145. #define KC_FKEY3    131
  146. #define KC_FKEY4    132
  147. #define KC_FKEY5    133
  148. #define KC_FKEY6    134
  149. #define KC_FKEY7    135
  150. #define KC_FKEY8    136
  151. #define KC_FKEY9    137
  152. #define KC_FKEY10    138
  153.  
  154. #define KC_HELP        139    /* Hit the help key. */
  155.  
  156.     /* Flags for the PopSupport-structure. */
  157.  
  158. #define PS_CENTER    0x00000001    /* Center the requester. */
  159. #define PS_TIMEOUT    0x00000002    /* Close after timeout. */
  160. #define PS_DONTMOVE    0x00000004    /* Don't put the pointer on a gadget. */
  161. #define PS_BEEP        0x00000008    /* Send a display beep on open. */
  162. #define PS_STAYACTIVE    0x00000010    /* Stay active. */
  163. #define PS_ANNOUNCE    0x00000020    /* New beep. */
  164.  
  165.     /* Definitions for pop-up-menus. */
  166.  
  167. #define POPTITLEHEIGHT 10    /* Standard height of the menu title. */
  168.  
  169.     /* These flags have to be incorporated into the Flags entry
  170.      * of the Menu-structure.
  171.      */
  172.  
  173. #define POPVERIFY    0x0002    /* Reserved. */
  174. #define POPRELEASE    0x0004    /* Reserved. */
  175. #define POPTIDY        0x0008    /* Menu has to appear entirely. */
  176. #define POPPOINTREL    0x0010    /* Menu appears relative to pointer. */
  177. #define POPWINREL    0x0020    /* Menu appears relative to window. */
  178. #define POPREMEMBER    0x0040    /* NOT SUPPORTED! */
  179. #define POPUSED        0x0080    /* NOT SUPPORTED! */
  180. #define POPMOVEPOINTER    0x0200    /* Reserved. */
  181. #define POPLEFTBUTTON    0x1000    /* Menu activated by left button. */
  182. #define POPRIGHTBUTTON    0x2000    /* Menu activated by right button. */
  183. #define POPTRIGGERDOWN    0x4000    /* Reserved. */
  184. #define POPTRIGGERUP    0x8000    /* Reserved. */
  185.  
  186.     /* InvertKey-Kommandos. */
  187.  
  188. #define IK_NOSPECIAL    0    /* No fancy action. */
  189. #define IK_BUILDLIST    1    /* Build conversion list. */
  190. #define IK_USEIKM    2    /* Use Jimm's IKM routines. */
  191. #define IK_USELIST    4    /* Use list conversion. */
  192.  
  193.     /* Some special macros. */
  194.  
  195. #define byte(Width)    (((Width + 15) >> 4) << 1)
  196. #define LOCAL        static
  197. #define AllocItem(i)    ((VOID *)AllocMem(sizeof(i),MEMF_PUBLIC | MEMF_CLEAR))
  198. #define FreeItem(i)    (i ? FreeMem(i,sizeof(i)) : 0)
  199. #define AllocPub(s)    (AllocRem(s,MEMF_PUBLIC | MEMF_CLEAR))
  200. #define AllocChip(s)    (AllocRem(s,MEMF_PUBLIC | MEMF_CHIP | MEMF_CLEAR))
  201.  
  202.     /* Library tags. */
  203.  
  204. #define MXM_NAME    "mxm.library"
  205. #define MXM_VERSION    34L
  206.  
  207.     /* Use this rather than MXM_VERSION to open mxm.library. */
  208.  
  209. #define MXM_MINIMUM    34L
  210.  
  211. #endif    /* _MXMBASE_H */
  212.